FROM node:14.19.3-alpine

RUN  echo  "http://mirrors.aliyun.com/alpine/v3.15/community"  >> /etc/apk/repositories \
  && apk update  \
  && npm config set registry https://repo.huaweicloud.com/repository/npm/   \
  && npm install cnpm -g --registry=https://registry.npmmirror.com/ \
  && apk add --no-cache ansible openssh sshpass tcl  python2  make g++
  
RUN mkdir -p /etc/ansible \
    && ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa \
    && rm -rf /var/cache/apk/*
ADD ansible.cfg /etc/ansible/ansible.cfg

CMD [ "node" ]
